data("rest_inspec")
rest_inspec =
rest_inspec |>
drop_na()
rest_inspec |>
filter(year(inspection_date) == '2017') |>
plot_ly(x = ~inspection_date, y = ~score, alpha = 0.4,
type = "scatter", mode = "markers")
rest_inspec |>
filter(boro !='Missing') |>
count(boro) |>
mutate(boro = fct_reorder(boro, n)) |>
plot_ly(x = ~boro, y = ~n, color = ~boro, type = "bar")
data("rest_inspec")
rest_inspec |>
mutate(year = year(inspection_date)) |>
filter(year %in% c('2013', '2014', '2015', '2016', '2017')) |>
plot_ly(x = ~year, y = ~score, type = "box")